pin = 4
gpio.mode(pin,gpio.OUTPUT)
print('--初始关闭LED4--')
gpio.mode(pin,gpio.HIGH)


local mytim = tmr.create() -- create定时器对象
mytim:alarm(1000,tmr.ALARM_AUTO,function()
    if gpio.read(pin) == gpio.HIGH then
            gpio.write(pin,gpio.LOW)
        else
            gpio.write(pin,Bpio.HIGH)
        end
end)
